<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>编辑学生数据</title>
<script type="text/javascript">
function aaa(form) {
	var name=form.name.value;
	var stuNo=form.stuNo.value;
	var password=form.password.value;
	if(name.length==0){
		alert("学生名字不能为空");
		return false;
	}
	if(stuNo.length==0){
		alert("学号不能为空");
		return false;
	}
	if(password.length==0){
		alert("密码不能为空")
		return false;
	}
	return true;
}

</script>
<style type="text/css">
	form p label {
		display: inline-block;
		width: 80px;
		text-align: right;
	}
	form p input {
		padding: 5px;
		width: 200px;
	}
</style>
</head>
<body background="images/1.jpg">
<h2>学生编辑</h2>
<form action="stu?method=sava" method="post" style="width: 300px;"onsubmit="return aaa(this)">
	<input type="hidden" name="id" value="${model.id}">
	<input type="hidden" name="bjId" value="${model.tbclass.id}">
	<p><label>学号：</label><input type="text" name="stuNo" value="${model.stuNo}"></p>
	<p><label>姓名：</label><input type="text" name="name" value="${model.name}"></p>
	<p><label>密码：</label><input type="password" name="password" value="${model.password}"></p>
	
	<p style="text-align: right;"><button type="submit">提交</button> <button type="reset" style="margin-left: 10px;margin-right: 20px;">重置</button></p>
</form>
<a href="stu?bjId=${model.tbclass.id}">返回</a>

</body>
</html>